<template>
  <div>
    <div class="swiper-container" :class = "name">
      <div class="swiper-wrapper">
        <slot></slot>
      </div>
    </div>
  </div>
</template>
<script>
import Swiper from "swiper/bundle";
import "swiper/css/bundle";
/* 导入样式不需要form */
export default {
  props: {
      perview:{
          type:Number,
          default: 1
      },
      name:{
          type:String,
          default: 'err'
      }
  },

  mounted() {
    new Swiper('.' + this.name, {
      slidesPerView: this.perview,
      spaceBetween: 30,
      freeMode: true,
    });
  },
};
</script>

<style lang="scss"></style>
